package application;

import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;

import java.util.Objects;

public class Bean {
    private SimpleIntegerProperty index = new SimpleIntegerProperty();
    private SimpleStringProperty ip = new SimpleStringProperty();
    private SimpleStringProperty port = new SimpleStringProperty();
    private SimpleStringProperty status = new SimpleStringProperty();
    private SimpleStringProperty rate = new SimpleStringProperty();


    public Bean() {
    }

    public Bean(Integer index, String ip, String port, String status, String rate) {
        super();
        this.index = new SimpleIntegerProperty(index);
        this.ip = new SimpleStringProperty(ip);
        this.port = new SimpleStringProperty(port);
        this.status = new SimpleStringProperty(status);
        this.rate = new SimpleStringProperty(rate);
    }

    public Bean(String ip, String port) {
        this.ip = new SimpleStringProperty(ip);
        this.port = new SimpleStringProperty(port);
    }

    public Bean(String ip) {
        this.ip = new SimpleStringProperty(ip);
    }

    public int getIndex() {
        return index.get();
    }

    public SimpleIntegerProperty indexProperty() {
        return index;
    }

    public void setIndex(int index) {
        this.index.set(index);
    }

    public String getIp() {
        return ip.getValue();
    }

    public void setIp(SimpleStringProperty ip) {
        this.ip = ip;
    }

    public String getPort() {
        return port.getValue();
    }

    public void setPort(SimpleStringProperty port) {
        this.port = port;
    }

    public String getStatus() {
        return status.getValue();
    }

    public void setStatus(SimpleStringProperty status) {
        this.status = status;
    }

    public String getRate() {
        return rate.getValue();
    }

    public void setRate(SimpleStringProperty rate) {
        this.rate = rate;
    }
}
